<template>
  <div id="app">
    <!-- 顶部导航 -->
    <Header></Header>
    <!-- 头部搜素区 -->
    <SearchHeader></SearchHeader>
    <!-- 内容区 -->
    <div class="wrap">
      <div class="container">
        <router-view v-if="reload" />
      </div>
    </div>
    <!-- 右侧导航 -->
    <right-nav></right-nav>
    <!-- 页脚 -->
    <div class="footer">
        <el-row class="container">
          <el-col :span="8" class="left">
            <router-link to="/about">关于我们</router-link>
            <router-link to="/responsibility">责任博彩</router-link>
            <router-link to="/help">帮助中心</router-link>
            <span>QQ：55372015</span>
          </el-col>
          <el-col :span="16" class="right">
            CopyRight © 2009-2020 www.huobet.com All rights reserved.
            Powered by
            <span class="link">火博网</span>
            (<span class="link">粤ICP备12027063号</span>)
          </el-col>
        </el-row>
    </div>
    <login v-if="$store.state.showLogin"></login>
  </div>
</template>

<script>
import Vue from 'vue';
import ElementUi from 'element-ui';
import 'normalize.css';
import 'element-ui/lib/theme-chalk/index.css';
import '../../public/static/fonts/iconfont.css';
import api from './request';
import Header from './components/Header.vue';
import SearchHeader from './components/SearchHeader.vue';
import RightNav from './components/RightNav.vue';
import Login from './views/Login.vue';
import { mapState } from 'vuex';

Vue.use(ElementUi);
Vue.prototype.$api = api;
Vue.prototype.notFinished = function () {
  this.$message({
    type: 'warning',
    message: '待开发'
  });
};

export default {
  name: 'App',
  components: {
    Header,
    SearchHeader,
    RightNav,
    Login
  },
  computed: {
    ...mapState(['reload'])
  }
};

</script>
<style lang="less">
  @import './less/reset.less';
  @import './less/global.less';
  html, body {
    height: 100%;
    font-size: 14px;
    background-color: #f3f3f3;
  }
  #app {
    height: 100%;
    .wrap {
      padding-top: 10px;
      box-shadow: 0 -2px 10px -1px #ccc;
      .container {
        width: @mainWidth;
        margin: 0 auto;
      }
    }
    .footer {
      background-color: #6b6b6b;
      .container {
        width: @mainWidth;
        margin: 10px auto 0;
        height: 40px;
        line-height: 40px;
        color: #fff;
        font-size: 12px;
        .left {
          a {
            padding: 0 6px;
            border-right: 1px solid #fff;
            color: #fff;
            text-decoration: none;
            &:hover {
              color: #fcff00;
            }
            &:first-child {
              padding-left: 0;
            }
          }
          span {
            margin-left: 6px;
            font-weight: bold;
            color: #fcff00;
          }
        }
        .right {
          text-align: right;
        }
      }
    }
  }
  .router-link-active {
    background-color: #00a895;
    color: #fff !important;
  }
</style>
